<?php

class Admin_Form_BaseConfigForm extends Zend_Form {
	public function init(){
		
		$translator = new Zend_Translate(
          'array',
          APPLICATION_PATH.'/../library/Nippy/languages/lang.ru.php',
          'ru',
          array('scan' => Zend_Translate::LOCALE_DIRECTORY)
        );
		Zend_Validate_Abstract::setDefaultTranslator($translator);
        
        $this->addElement('text', 'Name', array(
            'label'      => 'Внутреннее название:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
        $this->addElement('text', 'URL', array(
            'label'      => 'URL:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
        ));
        
        $this->addElement('text', 'Title', array(
            'label'      => 'Title:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        ));
        $this->addElement('text', 'MetaKeywords', array(
            'label'      => 'MetaKeywords:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        ));
        $this->addElement('text', 'MetaDescription', array(
            'label'      => 'MetaDescription:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        ));
        $this->addElement('checkbox', 'InMenu', array(
            'label'      => 'InMenu:',
            'required'   => false,
        ));
        $this->addElement('text', 'MenuTitle', array(
            'label'      => 'MenuTitle:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => false,
        ));
	}
}

?>